import random
print('*********石头、剪刀、布***********\n'
      '1.石头\n'
      '2.剪刀\n'
      '3.布\n')
computer = random.choice(('石头','剪刀','布','认输'))
player=input('请出拳:')
player=int(player)
if computer=='石头':
      if player ==1:
        print('\n对手出：石头\n'
              '你出：石头\n'
              '结果：平局')
      elif player == 2:
        print('\n对手出：石头\n'
              '你出：剪刀\n'
              '结果：对手赢')
      elif player == 3:
        print('\n对手出：石头\n'
              '你出：布\n'
              '结果：你赢了')
      else:
        print('结果有误')
elif computer=='剪刀':
      if player ==1:
        print('\n对手出：剪刀\n'
              '你出：石头\n'
              '结果：你赢了')
      elif player == 2:
        print('\n对手出：剪刀\n'
              '你出：剪刀\n'
              '结果：平局')
      elif player == 3:
        print('\n对手出：剪刀\n'
              '你出：布\n'
              '结果：对手赢')
      else:
        print('结果有误')
elif computer == "布":
      if player ==1:
        print('\n对手出：布\n'
              '你出：石头\n'
              '结果：对手赢')
      elif player == 2:
        print('\n对手出：布\n'
              '你出：剪刀\n'
              '结果：你赢了')
      elif player == 3:
        print('\n对手出：布\n'
              '你出：布\n'
              '结果：平局')
      else:
        print('结果有误')
else:
    print('对手认输，你赢了')
